home *** CD-ROM | disk | FTP | other *** search
/ Merciful 1 / Merciful - Disc 1.iso / software / b / blitz_blanker / blitzblankerv2.05a.dms / BlitzBlank_2.50 / Developer / BlitzBlank.h < prev    next >
C/C++ Source or Header  |  1995-03-01  |  7KB  |  141 lines

  1. #ifndef BLITZBLANK_H
  2. #define BLITZBLANK_H
  3.  
  4. #include <exec/ports.h>
  5. #include <exec/tasks.h>
  6.  
  7.  
  8. /****************************************/
  9. /* $VER: BlitzBlank.h 2.50 (01.03.95)   */
  10. /****************************************/
  11.  
  12. /********************************/
  13. /* Stuff for blitzblank.library */
  14. /********************************/
  15.  
  16. #define BLITZBLANKLIB_VER 6
  17.  
  18. extern struct BitMap   *BBL_AllocBitMap        (ULONG width,ULONG height,ULONG depth,ULONG flags);
  19. extern struct BitMap   *BBL_AllocDBufBitMap    (struct Screen *screen);
  20. extern struct RastPort *BBL_AllocRastPort      (ULONG width,ULONG height,ULONG depth,ULONG flags);
  21. extern void             BBL_BlankDone          (void);
  22. extern struct Window   *BBL_BlankMouse         (struct Screen *screen,UBYTE mode);
  23. extern void             BBL_CloseScreenSafe    (struct Screen *screen);
  24. extern BOOL             BBL_CopyOriginalColors (struct Screen *screen);
  25. extern BOOL             BBL_CopyOriginalScreen (struct Screen *screen);
  26. extern void             BBL_EndDBuf            (ULONG handle);
  27. extern BOOL             BBL_FadeDown           (struct Screen *screen,UBYTE final,UBYTE delay);
  28. extern void             BBL_FreeBitMap         (struct BitMap *bitmap);
  29. extern void             BBL_FreeRastPort       (struct RastPort *rastport);
  30. extern long             BBL_GetDarkestPen      (struct Screen *screen);
  31. extern char*            BBL_GetString          (UWORD num,char *text);
  32. extern ULONG            BBL_InitDBuf           (struct Screen *screen,struct BitMap *bitmap);
  33. extern void             BBL_ModuleRunning      (void);
  34. extern BOOL             BBL_ScreenAvailable    (struct Screen *screen);
  35. extern BOOL             BBL_SendMessage        (struct BB_Message *bbmessage,char *portname);
  36. extern void             BBL_ShowBitMap         (struct Screen *screen,struct BitMap *bitmap,ULONG handle);
  37. extern void             BBL_UnBlankMouse       (struct Window *window);
  38.  
  39.  
  40. /*******************************************************************/
  41. /* The different kinds of GUI-objects for a module's config-window */
  42. /*******************************************************************/
  43.  
  44. #define BB_PGroup     1 /* Indicates the start of a new page group */
  45. #define BB_PGroup_End 2 /* Indicates the end of the page group */
  46. #define BB_VGroup     3 /* Indicates the start of a new vertical group */
  47. #define BB_VGroup_End 4 /* Indicates the end of the vertical group */
  48. #define BB_Check      5 /* Checkmark, uses set field in BB_Object */
  49. #define BB_String     6 /* Textgadget, uses max/contents fields in BB_Object */
  50. #define BB_File       7 /* Stringgadget with attached filerequester */
  51. #define BB_Slider     8 /* Slidergadget, uses min/max/set fields in BB_Object */
  52. #define BB_Cycle      9 /* Cyclegadget, uses set/contents in BB_Object */
  53. #define BB_Dummy     10 /* Dummy, if you want no gadgets at all */
  54. #define BB_Font      11 /* Stringgadget with attached fontrequester */
  55. #define BB_Dir       12 /* Stringgadget with attached filerequester, Dirs only */
  56.  
  57. /*****************************************/
  58. /* Flags used in BB_Message's flag-field */
  59. /*****************************************/
  60.  
  61. #define BBF_Screenmode   (1L <<  0)  /* Allows screenmode-selection */
  62. #define BBF_Colors       (1L <<  1)  /* Allows screendepth-selection */
  63. #define BBF_Sample       (1L <<  2)  /* Not supported yet */
  64. #define BBF_NoWatch      (1L <<  3)  /* Eats no CPU-time, so needs no checking */
  65. #define BBF_NoScreen     (1L <<  4)  /* Wants no screen from BlitzBlank */
  66. #define BBF_FirstScreen  (1L <<  5)  /* Wants pointer to screen in front, be CAREFUL with this! */
  67. #define BBF_CloneScreen  (1L <<  6)  /* Wants a clone from the FrontScreen */
  68. #define BBF_AmigaOnly    (1L <<  7)  /* Not supported yet */
  69. #define BBF_NoMouseBlank (1L <<  8)  /* No mouseblanking from BlitzBlank wanted */
  70. #define BBF_NoKeyPass    (1L <<  9)  /* No keypassing necessary (no mouseblanking, no own active window */
  71. #define BBF_BigWindow    (1L << 10)  /* The blankwindow fills the whole screen */
  72. #define BBF_Interleaved  (1L << 11)  /* BlitzBlank TRIES to give you a screen with an Interleaved BitMap */
  73.  
  74.  
  75. /*****************************************/
  76. /* The structure, that holds config-data */
  77. /*****************************************/
  78.  
  79. struct BB_Object
  80. {
  81.   struct BB_Object* next;     /* Pointer to next object or NULL if last object */
  82.   WORD              type;     /* What kind of GUI-object this is */
  83.   long              min;      /* Minimum value for BB_Slider */
  84.   long              max;      /* Maximum value for BB_Slider, max length of BB_String */
  85.   long              set;      /* Value of BB_Slider, state of BB_Checkmark, BB_Cycle */
  86.   char             *contents; /* Pointer to buffer for BB_String, pointer to stringarray for BB_Cycle */
  87.   char             *label;    /* Label for ALL objects */
  88. };
  89.  
  90.  
  91. /*****************************************************/
  92. /* The message to send to BlitzBlank/BlitzBlankPrefs */
  93. /*****************************************************/
  94.  
  95. struct BB_Message
  96. {
  97.   struct Message    msg;        /* Normal Exec-Message-structure */
  98.   long              flags;      /* Flags for this module */
  99.   char             *infotext;   /* Pointer to infotext for this module */
  100.   struct BB_Object *first;      /* Pointer to first BB_Object or NULL for Info-action */
  101.   WORD              modpri;     /* not of use, if you use the library */
  102.   char             *path;       /* Path to directory for module-data */
  103.   struct Task      *blitzblank; /* not of use, if you use the library */
  104. };
  105.  
  106.  
  107. /***************************************/
  108. /* The BlitzBlank-Screeninfo-structure */
  109. /***************************************/
  110.  
  111. struct BB_Screeninfo
  112. {
  113.   WORD             xpos;       /* should be 0 */
  114.   WORD             ypos;       /* should be 0 */
  115.   WORD             width;      /* User-selected screen-width */
  116.   WORD             height;     /* User-selected screen-height */
  117.   WORD             depth;      /* User-selected screen-depth */
  118.   long             mode;       /* User-selected screen-mode */
  119.   struct Screen   *bbscreen;   /* module screen */
  120.   struct Window   *bbwindow;   /* blank window */
  121.   WORD             mindepth;   /* desired minimum depth or 0 */
  122.   WORD             maxdepth;   /* desired maximum depth or 0 */
  123. };
  124.  
  125.  
  126. /************************************************************/
  127. /* Flag-definition for BBL_AllocBitMap()/BBL_AllocRastPort, */
  128. /* if you don't have the V39-includes                       */
  129. /************************************************************/
  130.  
  131. #ifndef BMB_CLEAR
  132. #define BMB_CLEAR 0
  133. #define BMB_DISPLAYABLE 1
  134. #define BMB_INTERLEAVED 2
  135. #define BMF_CLEAR (1l<<BMB_CLEAR)
  136. #define BMF_DISPLAYABLE (1l<<BMB_DISPLAYABLE)
  137. #define BMF_INTERLEAVED (1l<<BMB_INTERLEAVED)
  138. #endif
  139.  
  140. #endif
  141.